home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
PBLIB1
/
DOC
/
DEVTOOLS.TXT
< prev
next >
Wrap
Text File
|
1994-04-30
|
6KB
|
134 lines
Development Tools
The function of a development system is to facilitate the
writeing and testing of code. The Turbo IDE works pretty well
as far as the Edit/Compile/Test portion of the cycle goes, but
doesn't facilitate multiple program development, code libraries
documentation or distribution. Until recently, I have been
adding utility programs one by one as the need arises. Along the
way, I have been building up a library of routines and objects which
make each additional program easier to assemble.
The following are stand-alone utilities, each performing a
useful function. Because they share code libraries and structures,
their operation is similar. See the section on Utility Program Structure
for details.
A design target of mine is that any program should be 80%-90%
library routines. To the maximum extent possible, re-useable code
is made a little more general than necessary and moved into the library.
This makes the utilities themselves pretty simple to examine.
My primary goals are:
1. Everything is absolutely in the PUBLIC DOMAIN.
2. Everything can be re-compiled and changed to taste.
3. Most sensible options are supported via CFG files or command
line parameters.
The programs:
1. TLISTER - Optimized for the listing of PASCAL source files. If
file extension not specified, assumes '.pas'. It can handle '*.pas'
for all files on a directory. Page header contains
the file mod date, name, and page number. The command line
option INTERFACE=YES will list out only the interface section of
a unit.
2. TPRINT - Old-Fashioned text file formatter. Printing is controlled
by visible "\" commands in the text. Commands for setting headers
and footers, centering lines, word-wrap, indent and others are
available. Produces decent looking documentation.
3. TED - My own personalized text editor built around Borland's Editor
Toolbox - BINED. Built strictly to my own tastes, but it is
small and can be hooked into programs. The EXE is freely useable
by anyone, from Borland's license, but modifying the source
requires purchasing the Toolbox. {Oops, BINED isn't working
with TP7, with each generation of compiler, I wind up having
to go back to BORLAND}
4. USES - Scans unit and program files for the USES statement and
parses it. USES * goes through all '.pas' files on the current
directory and prints their uses statement. USES miscstuf would
scan all '.pas' files and list only those which used 'miscstuf'.
5. DUMP - simple hex dumping utility, but with enough controls over
start and end points, amount listed and format to make it a
useful tool.
6. DIRS - provides a summary of the disk at the directory level. Scans
all paths and accumulates statistics for each directory just
off the root. Lets you see quickly which obsolete directories
are costing the most disk space.
7. BIGFILES - scans entire disk, and lists files which exceed the
specified file size.
8. FIND - scans entire disk for files matching template. Bigger andd
probably slower than many others, but it is free and I can control it.
9. ZIP & PUT - My personal backup system. See later discussion.
10. DB - Ongoing xBase utilities and routines. I like ALPHA 4 and R&R Report
Writer and others, but I can't give away or sell them. Current
status is:
DB DDL - shows record structure
DB DUMP - Record lister with considerable power
DB ZAP - Deletes all records
DB CLONE - Creates new empty file from existing DBF
DB SORT - Sorts (and packs) a DBF via a key
DB EXPORT - Extracts structure and data to text file
DB IMPORT - Creates DBF and loads it
DBPASGEN - generates a small pascal unit to access the DBF file
Code Library status is centered around DBF_object and
KEYED_DBF_object, with lower level access in xbasstuf. DBF read
rewrite, append, delete and various other functions. I estimate
the system at 85% completion (what is there is 100%, but there
are missing logical pieces).
I do not support xBase indexing (I have my own) primarily because
I don't have useful specifications for the files. Same goes
for memos.
I have not yet approached the screen entry aspect since I am happy
with Alpha 4, but would love to integrate a good PUBLIC DOMAIN
screen package.
11. TP - My own IDE, replaces a number of batch files, uses TPC for
compilation and handles smart copying to and from library units.
You could easily substitute your own favorite text editor.
12. DELAY - trivial. Need to put delays into some compile batch files
to slow them enough to see errors.
13. ENV - for addressing envelopes on a LJ 4, not generalized, but would
probably work for other PCL based printers, could be generalized.
Overall structure:
1. Most utility programs allow for '.cfg' files to process input parameters.
If the program is named XXXX.exe, config files are merged together in the
following order:
0. compiled in default values
1. c:\XXXX.cfg
2. XXXX.cfg wherever the EXE file is
3. XXXX.cfg in the current directory
4. --------.--- named by EXTRA=--------.--- in one of the cfg files
All of the cfg files are optional, assuming the compiled defaults
do something useful.
In these files are things like COMPRESSED=YES or LABEL='Test Program',
and the last one encountered rules. This allows utilities to take on
locally useful defaults without messing up standard configuration. For
example, I tend to leave TLISTER with OUT= pointed to LPT1 so I can
quickly print out source files. If I don't want to waste paper on a
particular project, I can add TLISTER.cfg on a development directory
and place OUT=TEMP.TXT in it. This makes TLISTER act differently here
than anywhere else.
I can easily have ENV (envelope printer) point to different address
lists on my wife's directories than my own.